<?php
class YishenAction extends Action
{
	//获取顶级
    public function yjyis()
	{

        header('Access-Control-Allow-Origin:*');
        //die(P($id));
    //首页model
    $TypeModel = new YishenModel();
    
    //获取内容
    $result = $TypeModel->getListAll();

    die(json_encode($result));

	}

  //获取二级
    public function yjlist()
  {
      header('Access-Control-Allow-Origin:*');
    $id = $_POST['id'];

      //首页model
      $TypeModel = new YishenModel();
      //获取内容
      $result = $TypeModel->erListAll($id);

    die(json_encode($result));

  }
  //获取详情
    public function xxtext()
    {
        header('Access-Control-Allow-Origin:*');
        $id = $_POST['id'];

        //首页model
        $TypeModel = new YishenModel();
        //获取内容
        $result = $TypeModel->ListD($id);

            //获取图片域名地址
            //使用1的域名
        $http_url = $TypeModel->Hosturl(1);


            $result['img'] =$http_url['img_url'].$result['base_img'];



        die(json_encode($result));

    }

}
?>